package com.oceansoft.mobile.biz.admin.entity;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

import org.springframework.jdbc.core.RowMapper;

/**
 * 新闻实体类
 * 
 * @author Administrator
 * 
 */
public class NewsArticle {
	private long sid;
	private String title;
	private String picCover;
	private String content;
	private String author;
	private long mer_id;
	private Date updateTime;
	private int status;
	private Date showdateTime;
	private String photos;
	private Date creatTime;
	private int type;
	private String originalName;
	private long pid;

	public NewsArticle() {
		super();
	}

	public static RowMapper<NewsArticle> getFullNewsMapper() {
		return new RowMapper<NewsArticle>() {
			@Override
			public NewsArticle mapRow(ResultSet rs, int index) throws SQLException {
				NewsArticle obj = new NewsArticle();
				obj.setSid(rs.getLong("sid"));
				obj.setTitle(rs.getString("title"));
				obj.setPicCover(rs.getString("picCover"));
				obj.setContent(rs.getString("content"));
				obj.setAuthor(rs.getString("author"));
				obj.setMer_id(rs.getLong("mer_id"));
				obj.setStatus(rs.getInt("status"));
				obj.setShowdateTime(rs.getTimestamp("showdateTime"));
				obj.setCreatTime(rs.getTimestamp("creatTime"));
				obj.setType(rs.getInt("type"));
				obj.setOriginalName(rs.getString("originalName"));
				obj.setPid(rs.getLong("pid"));
				return obj;
			}
		};
	}

	public long getPid() {
		return pid;
	}

	public void setPid(long pid) {
		this.pid = pid;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public long getSid() {
		return sid;
	}

	public void setSid(long sid) {
		this.sid = sid;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getPicCover() {
		return picCover;
	}

	public void setPicCover(String picCover) {
		this.picCover = picCover;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public long getMer_id() {
		return mer_id;
	}

	public void setMer_id(long mer_id) {
		this.mer_id = mer_id;
	}

	public Date getShowdateTime() {
		return showdateTime;
	}

	public void setShowdateTime(Date showdateTime) {
		this.showdateTime = showdateTime;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getPhotos() {
		return photos;
	}

	public void setPhotos(String photos) {
		this.photos = photos;
	}

	public Date getCreatTime() {
		return creatTime;
	}

	public void setCreatTime(Date creatTime) {
		this.creatTime = creatTime;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getOriginalName() {
		return originalName;
	}

	public void setOriginalName(String originalName) {
		this.originalName = originalName;
	}
	
}
